﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SearchAndActivate.aspx.cs"
    MaintainScrollPositionOnPostback="true" Inherits="Corsat.Web.Administration.SearchAndActivate"
    MasterPageFile="../Admin.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .progressBackgroundFilter
        {
            position: fixed;
            top: 0px;
            bottom: 0px;
            left: 0px;
            right: 0px;
            overflow: hidden;
            padding: 0;
            margin-left: auto;
            margin-right: auto;
            background-color: #000;
            filter: alpha(opacity=50);
            opacity: 0.5;
            z-index: 1000;
        }
        
        .processMessage
        {
            margin-left: auto;
            margin-right: auto;
            position: fixed;
            top: 30%;
            left: 43%;
            padding: 10px;
            width: 14%;
            z-index: 1001;
            background-color: #fff;
            border: solid 1px #000;
            text-align: center;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <%-- <div style="background: url( 'http://www.corsat-youthbishopric.com/Arabic/images/themes/website-background.jpg' ) fixed center top;">--%>
    <asp:ScriptManager ID="MainScriptManager" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress2" runat="server">
        <ProgressTemplate>
            <div class="progressBackgroundFilter">
            </div>
            <div class="processMessage">
                جارى التحميل...<br />
                <br />
                <img alt="Loading..." src="../Images/Loading.gif" />
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <table align="center" width="800px" style="float: left;" dir="rtl">
        <tr>
            <td>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Label ID="lblHeader" runat="server" Text="الــــــبـــــحــــــث" Font-Bold="true"
                    Font-Size="X-Large"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <hr />
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Panel ID="pnlSearchCriteria" runat="server" Width="450px">
                    <%--<asp:Label ID="lblSearchBy" runat="server" Text="البحث بـ" Font-Size="Large" style="float:right;"></asp:Label>--%>
                    <asp:RadioButtonList ID="rdoSearchOptions" runat="server" RepeatDirection="Horizontal"
                        Font-Size="Large">
                        <asp:ListItem Text="الإسم" Value="1" />
                        <asp:ListItem Text="الرقم القومى" Value="2" />
                        <asp:ListItem Text="الرقم الكورساتى" Value="3" />
                    </asp:RadioButtonList>
                    <asp:TextBox ID="txtSearchValue" runat="server" Style="text-align: center; font-size: large;"
                        Width="100%"></asp:TextBox>
                    <asp:Button ID="btnsearch" runat="server" Text="بــــــحــــــث" Style="font-size: large;
                        width: 100%; height: 100%;" OnClick="btnsearch_Click" />
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <hr />
            </td>
        </tr>
        <tr>
            <td style="width: 30%;vertical-align: top">
                <asp:UpdatePanel ID="upResults" runat="server">
                    <ContentTemplate>
                        <asp:ListBox ID="lstAccounts" runat="server" Height="500px" Width="100%" Font-Bold="true"
                            AutoPostBack="true" OnSelectedIndexChanged="lstAccounts_SelectedIndexChanged">
                        </asp:ListBox>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel>
            </td>
            <td style="width: 70%; vertical-align: top;" align="right">
                <asp:Panel ID="pnlDetails" runat="server" GroupingText="بيانات الدارس">
                    <asp:UpdatePanel ID="upAccountDetails" runat="server">
                        <ContentTemplate>
                            <table width="100%" style="font-size: large; font-weight: bold;">
                                <tr>
                                    <td style="width: 30%">
                                        <asp:Label ID="lblAccountName" runat="server" Text="الإسم" Width="100%"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtArabicName" runat="server" Width="100%" Style="text-align: center;"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <hr />
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 30%">
                                        <asp:Label ID="lblCorsatId" runat="server" Text="الرقم الكورساتى" Width="100%"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtCorsatId" runat="server" ReadOnly="true" Width="30%" Style="text-align: center;"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <hr />
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 30%">
                                        <asp:Label ID="lblSSN" runat="server" Text="الرقم القومى" Width="100%"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtSSN" runat="server" Width="100%" Style="text-align: center;"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <hr />
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 30%">
                                        <asp:Label ID="lblEmail" runat="server" Text="البريد الإلكترونى" Width="100%"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtEmail" runat="server" Width="100%" Style="text-align: center;"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <hr />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <asp:Panel ID="pnlTelephones" runat="server" GroupingText="أرقام التليفونات">
                                            <asp:GridView ID="grdTelephones" runat="server" AutoGenerateColumns="False" Width="80%"
                                                EnableModelValidation="True" OnRowCreated="grdTelephones_RowCreated">
                                                <Columns>
                                                    <asp:TemplateField HeaderText="النوع" HeaderStyle-Width="40%" ItemStyle-HorizontalAlign="Center">
                                                        <ItemTemplate>
                                                            <asp:DropDownList ID="ddlTeleType" runat="server" Width="80%" Font-Size="Large" />
                                                        </ItemTemplate>
                                                        <HeaderStyle Width="45%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="الرقم" HeaderStyle-Width="40%" ItemStyle-HorizontalAlign="Center">
                                                        <ItemTemplate>
                                                            <asp:TextBox ID="tbNumber" runat="server" Width="80%" Style="font-size: large; text-align: center"
                                                                onkeypress=" return isNumberKey(event);" />
                                                        </ItemTemplate>
                                                        <HeaderStyle Width="45%" />
                                                    </asp:TemplateField>
                                                </Columns>
                                            </asp:GridView>
                                        </asp:Panel>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <hr />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <asp:Panel ID="pnlCourses" runat="server" GroupingText="الــكــورســات">
                                            <asp:UpdatePanel runat="server" ID="upCourses">
                                                <ContentTemplate>
                                                    <ul>
                                                        <asp:DataList ID="dlCourses" runat="server" OnDeleteCommand="dlCourses_DeleteCommand"
                                                            Width="100%">
                                                            <ItemTemplate>
                                                                <li>
                                                                    <asp:Label runat="server" ID="lblCourseName" Text='<%# Bind("FullName") %>' />
                                                                    &nbsp;&nbsp;&nbsp; [<asp:LinkButton ID="lnkBtnDelete" runat="server" Text="مسح" CommandName="Delete"></asp:LinkButton>]
                                                                </li>
                                                            </ItemTemplate>
                                                        </asp:DataList>
                                                    </ul>
                                                    <asp:HiddenField ID="hfCoursesCount" runat="server" />
                                                </ContentTemplate>
                                                <Triggers>
                                                    <asp:AsyncPostBackTrigger ControlID="btnAddCourse" EventName="Click" />
                                                </Triggers>
                                            </asp:UpdatePanel>
                                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                                <ContentTemplate>
                                                    <asp:LinkButton ID="btnAddNewCourse" runat="server" Text="إضافة كورس" OnClick="btnAddNewCourse_Click"
                                                        Font-Size="Medium" />
                                                </ContentTemplate>
                                                <Triggers>
                                                    <asp:AsyncPostBackTrigger ControlID="btnAddCourse" EventName="Click" />
                                                    <asp:AsyncPostBackTrigger ControlID="dlCourses" EventName="DeleteCommand" />
                                                </Triggers>
                                            </asp:UpdatePanel>
                                            <asp:UpdatePanel ID="upChooseCourse" runat="server">
                                                <ContentTemplate>
                                                    <asp:Panel ID="pnlChooseCourse" runat="server" GroupingText="إختيار كورس" Font-Bold="False"
                                                        Font-Size="Large">
                                                        <table width="100%">
                                                            <tr>
                                                                <td colspan="3" align="center">
                                                                    <asp:Label ID="lblWarning" runat="server" Style="font-size: large; color: Red; font-weight: bold;"></asp:Label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td style="width: 10%; text-align: left;">
                                                                    <asp:Label ID="lblCourseName" runat="server" Text="الإسم"></asp:Label>
                                                                </td>
                                                                <td style="width: 40%">
                                                                    <asp:DropDownList ID="ddlCourseNames" runat="server" Width="100%" OnSelectedIndexChanged="ddlCourseNames_SelectedIndexChanged"
                                                                        AutoPostBack="true" Style="font-size: large; margin-right: 0px">
                                                                    </asp:DropDownList>
                                                                </td>
                                                                <td style="width: 40%">
                                                                    <asp:UpdatePanel ID="upCourseLevels" runat="server">
                                                                        <ContentTemplate>
                                                                            <asp:Panel ID="pnlCourseLevels" runat="server" GroupingText="المستوى">
                                                                                <asp:RadioButtonList ID="rdoLevel" runat="server" RepeatLayout="Flow" RepeatDirection="Vertical">
                                                                                </asp:RadioButtonList>
                                                                            </asp:Panel>
                                                                        </ContentTemplate>
                                                                        <Triggers>
                                                                            <asp:AsyncPostBackTrigger ControlID="ddlCourseNames" EventName="SelectedIndexChanged" />
                                                                        </Triggers>
                                                                    </asp:UpdatePanel>
                                                                </td>
                                                                <td style="width: 10%">
                                                                    <asp:LinkButton ID="btnAddCourse" runat="server" Text="إضافة" OnClick="btnAddCourse_Click" />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </asp:Panel>
                                                </ContentTemplate>
                                                <Triggers>
                                                    <asp:AsyncPostBackTrigger ControlID="btnAddCourse" EventName="ClicK" />
                                                    <asp:AsyncPostBackTrigger ControlID="btnAddNewCourse" EventName="Click" />
                                                </Triggers>
                                            </asp:UpdatePanel>
                                        </asp:Panel>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <hr />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                          <asp:Panel ID="Panel2" runat="server" GroupingText="بيانات التكنولوجيا">
                                        <table>
                                            <tr>
                                                <td class="label">
                                                    الكورس
                                                </td>
                                                <td>
                                                    <asp:Label runat="server" ID="lblTechCourseName"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="label">
                                                    تاريخ امتحان العملى
                                                </td>
                                                <td>
                                                    <asp:Label runat="server" ID="lblTechCourseTestDate"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="label">
                                                    فترة امتحان العملى
                                                </td>
                                                <td>
                                                    <asp:Label runat="server" ID="lblTechCourseExamPeriod"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="label">
                                                    المعمل
                                                </td>
                                                <td>
                                                    <asp:Label runat="server" ID="lblTechCourseExamLab"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="label">
                                                    تم الحجز فى
                                                </td>
                                                <td>
                                                    <asp:Label runat="server" ID="lblTechCourseExamResrvationDate"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="label">
                                                    الدرجة
                                                </td>
                                                <td>
                                                    <asp:Label runat="server" ID="lblTechCourseResult"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="label">
                                                    التقدير
                                                </td>
                                                <td>
                                                    <asp:Label runat="server" ID="lblTechCourseGrade"></asp:Label>
                                                </td>
                                            </tr>
                                        </table>
                                        </asp:Panel>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <asp:Panel ID="Panel1" runat="server" GroupingText="نتائج سابقة">
                                            <asp:GridView ID="resultsGridView" runat="server">
                                            </asp:GridView>
                                        </asp:Panel>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <hr />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <asp:Button ID="btnActivate" runat="server" Text="تفعيل الحساب" Width="100%" Style="font-size: large;
                                            font-weight: bold" OnClick="btnActivate_Click" />
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="lstAccounts" EventName="SelectedIndexChanged" />
                        </Triggers>
                    </asp:UpdatePanel>
                </asp:Panel>
            </td>
        </tr>
    </table>
    <%--</div>--%>
</asp:Content>
